<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="robots" content="index, follow, all" />
    <title>Grafika\Grafika | API</title>

            <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="../css/bootstrap-theme.min.css">
        <link rel="stylesheet" type="text/css" href="../css/sami.css">
        <script src="../js/jquery-1.11.1.min.js"></script>
        <script src="../js/bootstrap.min.js"></script>
        <script src="../js/typeahead.min.js"></script>
        <script src="../sami.js"></script>
        <meta name="MobileOptimized" content="width">
        <meta name="HandheldFriendly" content="true">
        <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
    
    
    </head>

    <body id="class" data-name="class:Grafika_Grafika" data-root-path="../">
            <div id="content">
        <div id="left-column">
                <div id="control-panel">
                <form id="search-form" action="../search.html" method="GET">
            <span class="glyphicon glyphicon-search"></span>
            <input name="search"
                   class="typeahead form-control"
                   type="search"
                   placeholder="Search">
        </form>
    </div>

                <div id="api-tree"></div>

        </div>
        <div id="right-column">
                <nav id="site-nav" class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="../index.html">API</a>
            </div>
            <div class="collapse navbar-collapse" id="navbar-elements">
                <ul class="nav navbar-nav">
                    <li><a href="../classes.html">Classes</a></li>
                                            <li><a href="../namespaces.html">Namespaces</a></li>
                                        <li><a href="../interfaces.html">Interfaces</a></li>
                    <li><a href="../traits.html">Traits</a></li>
                    <li><a href="../doc-index.html">Index</a></li>
                    <li><a href="../search.html">Search</a></li>
                </ul>
            </div>
        </div>
    </nav>

                        <div class="namespace-breadcrumbs">
            <ol class="breadcrumb">
                <li><span class="label label-default">class</span></li>
                                                            <li><a href="../Grafika.html">Grafika</a></li>
    
                <li>Grafika</li>
            </ol>
        </div>
                <div id="page-content">
                
    <div class="page-header">
        <h1>
            Grafika
                
        </h1>
    </div>

    <p>    class
    <strong>Grafika</strong>
</p>

        
    

            <div class="description">
            <p>Contains factory methods for detecting editors, creating editors and images.</p>                    </div>
    
    
            <h2>Constants</h2>

            <table class="table table-condensed">
                    <tr>
                <td>DIR</td>
                <td class="last">
                    <p><em>Grafika root directory</em></p>
                    <p></p>
                </td>
            </tr>
            </table>

    
    
            <h2>Methods</h2>

            <div class="container-fluid underlined">
                    <div class="row">
                <div class="col-md-2 type">
                    static&nbsp;string
                </div>
                <div class="col-md-8 type">
                    <a href="#method_fontsDir">fontsDir</a>()
        
                                            <p>Return path to directory containing fonts used in text operations.</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    static&nbsp;
                </div>
                <div class="col-md-8 type">
                    <a href="#method_setEditorList">setEditorList</a>(array $editorList)
        
                                            <p>Change the editor list order of evaluation globally.</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    static&nbsp;string
                </div>
                <div class="col-md-8 type">
                    <a href="#method_detectAvailableEditor">detectAvailableEditor</a>(array $editorList = null)
        
                                            <p>Detects and return the name of the first supported editor which can either be "Imagick" or "Gd".</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    static&nbsp;<a href="../Grafika/EditorInterface.html"><abbr title="Grafika\EditorInterface">EditorInterface</abbr></a>
                </div>
                <div class="col-md-8 type">
                    <a href="#method_createEditor">createEditor</a>(array $editorList = array(&#039;Imagick&#039;, &#039;Gd&#039;))
        
                                            <p>Creates the first available editor.</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    static&nbsp;<a href="../Grafika/ImageInterface.html"><abbr title="Grafika\ImageInterface">ImageInterface</abbr></a>
                </div>
                <div class="col-md-8 type">
                    <a href="#method_createImage">createImage</a>(string $imageFile)
        
                                            <p>Create an image.</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    static&nbsp;<a href="../Grafika/ImageInterface.html"><abbr title="Grafika\ImageInterface">ImageInterface</abbr></a>
                </div>
                <div class="col-md-8 type">
                    <a href="#method_createBlankImage">createBlankImage</a>(int $width = 1, int $height = 1)
        
                                            <p>Create a blank image.</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    static&nbsp;<a href="../Grafika/FilterInterface.html"><abbr title="Grafika\FilterInterface">FilterInterface</abbr></a>
                </div>
                <div class="col-md-8 type">
                    <a href="#method_createFilter">createFilter</a>(string $filterName)
        
                                            <p>Create a filter. Detects available editor to use.</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    static&nbsp;<a href="../Grafika/DrawingObjectInterface.html"><abbr title="Grafika\DrawingObjectInterface">DrawingObjectInterface</abbr></a>
                </div>
                <div class="col-md-8 type">
                    <a href="#method_createDrawingObject">createDrawingObject</a>(string $drawingObjectName)
        
                                            <p>Draws an object. Detects available editor to use.</p>                </div>
                <div class="col-md-2"></div>
            </div>
            </div>


        <h2>Details</h2>

            <div id="method-details">
                    <div class="method-item">
                    <h3 id="method_fontsDir">
        <div class="location">at line         line 66</div>
        <code>        static            string
    <strong>fontsDir</strong>()
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Return path to directory containing fonts used in text operations.</p>                                </div>
                <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td></td>
        </tr>
    </table>

            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_setEditorList">
        <div class="location">at line         line 80</div>
        <code>        static            
    <strong>setEditorList</strong>(array $editorList)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Change the editor list order of evaluation globally.</p>                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$editorList</td>
                <td></td>
            </tr>
            </table>

            
            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a target="_blank" href="http://php.net/Exception">Exception</a></td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_detectAvailableEditor">
        <div class="location">at line         line 95</div>
        <code>        static            string
    <strong>detectAvailableEditor</strong>(array $editorList = null)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Detects and return the name of the first supported editor which can either be "Imagick" or "Gd".</p>                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$editorList</td>
                <td>Array of editor list names. Use this to change the order of evaluation for editors for this function call only. Default order of evaluation is Imagick then GD.</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td>Name of available editor.</td>
        </tr>
    </table>

            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a target="_blank" href="http://php.net/Exception">Exception</a></td>
                <td>Throws exception if there are no supported editors.</td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_createEditor">
        <div class="location">at line         line 126</div>
        <code>        static            <a href="../Grafika/EditorInterface.html"><abbr title="Grafika\EditorInterface">EditorInterface</abbr></a>
    <strong>createEditor</strong>(array $editorList = array(&#039;Imagick&#039;, &#039;Gd&#039;))
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Creates the first available editor.</p>                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$editorList</td>
                <td>Array of editor list names. Use this to change the order of evaluation for editors. Default order of evaluation is Imagick then GD.</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="../Grafika/EditorInterface.html"><abbr title="Grafika\EditorInterface">EditorInterface</abbr></a></td>
            <td></td>
        </tr>
    </table>

            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a target="_blank" href="http://php.net/Exception">Exception</a></td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_createImage">
        <div class="location">at line         line 143</div>
        <code>        static            <a href="../Grafika/ImageInterface.html"><abbr title="Grafika\ImageInterface">ImageInterface</abbr></a>
    <strong>createImage</strong>(string $imageFile)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Create an image.</p>                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$imageFile</td>
                <td>Path to image file.</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="../Grafika/ImageInterface.html"><abbr title="Grafika\ImageInterface">ImageInterface</abbr></a></td>
            <td></td>
        </tr>
    </table>

            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a target="_blank" href="http://php.net/Exception">Exception</a></td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_createBlankImage">
        <div class="location">at line         line 163</div>
        <code>        static            <a href="../Grafika/ImageInterface.html"><abbr title="Grafika\ImageInterface">ImageInterface</abbr></a>
    <strong>createBlankImage</strong>(int $width = 1, int $height = 1)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Create a blank image.</p>                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$width</td>
                <td>Width of image in pixels.</td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$height</td>
                <td>Height of image in pixels.</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="../Grafika/ImageInterface.html"><abbr title="Grafika\ImageInterface">ImageInterface</abbr></a></td>
            <td></td>
        </tr>
    </table>

            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a target="_blank" href="http://php.net/Exception">Exception</a></td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_createFilter">
        <div class="location">at line         line 182</div>
        <code>        static            <a href="../Grafika/FilterInterface.html"><abbr title="Grafika\FilterInterface">FilterInterface</abbr></a>
    <strong>createFilter</strong>(string $filterName)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Create a filter. Detects available editor to use.</p>                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$filterName</td>
                <td>The name of the filter.</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="../Grafika/FilterInterface.html"><abbr title="Grafika\FilterInterface">FilterInterface</abbr></a></td>
            <td></td>
        </tr>
    </table>

            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a target="_blank" href="http://php.net/Exception">Exception</a></td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_createDrawingObject">
        <div class="location">at line         line 283</div>
        <code>        static            <a href="../Grafika/DrawingObjectInterface.html"><abbr title="Grafika\DrawingObjectInterface">DrawingObjectInterface</abbr></a>
    <strong>createDrawingObject</strong>(string $drawingObjectName)
        </code>
    </h3>
    <div class="details">
            
    

                    <div class="method-description">
                                    <p>Draws an object. Detects available editor to use.</p>                                </div>
                <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$drawingObjectName</td>
                <td>The name of the DrawingObject.</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="../Grafika/DrawingObjectInterface.html"><abbr title="Grafika\DrawingObjectInterface">DrawingObjectInterface</abbr></a></td>
            <td></td>
        </tr>
    </table>

            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a target="_blank" href="http://php.net/Exception">Exception</a></td>
                <td>We use array<em>key</em>exist() instead of isset() to be able to detect a parameter with a NULL value.</td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
            </div>

    
            </div>
                <div id="footer">
        Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>.
    </div>

        </div>
    </div>
    </body>

</html>
